home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15569 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: new-news.sprintlink.net!snet!CT1!personalvision!jmartin
  2. From: jmartin@personalvision (Jonathan Martin)
  3. Newsgroups: gnu.g++.help,comp.lang.c++
  4. Subject: [Q] I'm having a problem linking this simple one...
  5. Date: 6 Apr 1996 07:04:54 GMT
  6. Organization: Southern New England Telephone
  7. Message-ID: <4k552m$1to0@CT1.SNET.Net>
  8. NNTP-Posting-Host: 204.60.5.42
  9. Keywords: help
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Ok, I'm teaching myself c++, so bare with me.
  13.  
  14. When I compile this:
  15.     #include <CursesW.h>
  16.     main () {
  17.         CursesWindow mine (20,20,5,5);
  18.     }
  19. with the command line:
  20.  
  21.     g++ -I/usr/include/ncurses -ohello hello.cc
  22.  
  23. I get this from the linker:
  24.  
  25. /tmp/cca...: undefined reference to 'CursesWindow::~CursesWindow(void)'
  26. /tmp/cca...: undefined reference to 'CursesWindow::CursesWindow(int,int,int,int)'
  27.  
  28. I checked the command line that g++ is feeding to ld, and -lg++ is 
  29. there. I made a hello.o and checked the symbol table, and the symbols 
  30. that ld's having trouble with seem to match those in libg++ ok.  I 
  31. dunno.  Like I said, I'm new at this.
  32.  
  33. Any help would be greatly appreciated.
  34.  
  35. -Jon
  36. jmartin@snet.net
  37.  
  38.